<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class m_usia_model extends arfaModel
{
    function __construct() {
        parent::__construct();
		$this->table_name	= "master_usia";
		$this->primary_key	= "kd_usia";
		$this->order_by		= "kd_usia ASC";
    }

	public function cek_usia_aktif()
	{
		$this->db->select('*');
		$this->db->from($this->table_name);
		$this->db->where('status_usia', '1');
		$query = $this->db->get();

		return $query->num_rows();
	}

	public function get_key_usia_aktif()
	{
        $this->db->select('*');
        $this->db->from($this->table_name);
        $this->db->where('status_usia', '1');
        $query = $this->db->get();

        return $query->result_array();
	}
}